package com.social.service;

import com.social.dao.TopicMapper;
import com.social.dao.model.Topic;
import com.social.dao.model.TopicExample;
import com.social.daoEx.TopicMapperEx;
import com.social.daoEx.model.TopicEx;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TopicService {
    @Autowired
    private TopicMapper topicMapper;
    @Autowired
    private TopicMapperEx topicMapperEx;

    private static final Logger logger = Logger.getLogger(TopicService.class);

    public int countByExample(TopicExample example) {
        return this.topicMapper.countByExample(example);
    }

    public Topic selectByPrimaryKey(String id) {
        return this.topicMapper.selectByPrimaryKey(id);
    }

    public List<Topic> selectByExample(TopicExample example) {
        return this.topicMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(String id) {
        return this.topicMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Topic record) {
        return this.topicMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Topic record) {
        return this.topicMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(TopicExample example) {
        return this.topicMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(Topic record, TopicExample example) {
        return this.topicMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(Topic record, TopicExample example) {
        return this.topicMapper.updateByExample(record, example);
    }

    public int insert(Topic record) {
        return this.topicMapper.insert(record);
    }

    public int insertSelective(Topic record) {
        return this.topicMapper.insertSelective(record);
    }

	public List<TopicEx> selectAppList(Map<String, Object> map) {
		return topicMapperEx.selectAppList(map);
	}

	public List<TopicEx> selectMyPublishList(Map<String, Object> map) {
		return topicMapperEx.selectMyPublishList(map);
	}

	public List<TopicEx> selectMyReplyList(Map<String, Object> map) {
		return topicMapperEx.selectMyReplyList(map);
	}

	public List<TopicEx> selectWebTopicList(Map<String, Object> map) {
		return topicMapperEx.selectWebTopicList(map);
	}
}